﻿using System.ComponentModel.DataAnnotations;

namespace suirui.ZhuMu.Model
{
    public static class ErrorCode
    {

        #region 通用错误码

        /// <summary>
        /// 成功
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Success", Description = "成功", Prompt = "200")]
        public const int Success = 200;

        /// <summary>
        /// 成功成功但数据列表为空
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "SuccessEmpty", Description = "成功但数据列表为空", Prompt = "201")]
        public const int SuccessEmpty = 201;

        /// <summary>
        /// 成功成功但数据列表为空
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "QueryNull", Description = "未查询到相关实体数据", Prompt = "202")]
        public const int QueryNull = 202;

        /// <summary>
        /// 过期
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Success", Description = "秘钥过期", Prompt = "420")]
        public const int ExpiredError = 420;
        /// <summary>
        /// 解密错误
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Success", Description = "解密错误", Prompt = "421")]
        public const int DecryptError = 421;
        /// <summary>
        /// 未找到资源
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "NotFound", Description = "未找到资源", Prompt = "404")]
        public const int NotFound = 404;

        /// <summary>
        /// 未授权
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Unauthorized", Description = "未授权", Prompt = "401")]
        public const int Unauthorized = 401;

        /// <summary>
        /// 系统内部错误
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "ServiceError", Description = "系统内部错误", Prompt = "500")]
        public const int ServiceError = 500;

        /// <summary>
        /// EF操作错误
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "EFError", Description = "EF操作错误", Prompt = "505")]
        public const int EFError = 505;

        /// <summary>
        /// 禁止访问
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Forbidden", Description = "禁止访问", Prompt = "403")]
        public const int Forbidden = 403;

        /// <summary>
        /// 请求参数无效
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "InvalidParameter", Description = "请求参数无效", Prompt = "426")]
        public const int InvalidParameter = 426;
        
         /// <summary>
        /// 手机已绑定
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "InvalidParameter", Description = "请求参数无效", Prompt = "431")]
        public const int MobileExist = 431;
        /// <summary>
        /// 密码不能包含自身手机
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "InvalidParameter", Description = "请求参数无效", Prompt = "440")]
        public const int PassExistMobile = 440;
        /// <summary>
        /// 手机号码格式不正确
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "InvidMobile", Description = "手机号码格式不正确", Prompt = "444")]
        public const int InvidMobile = 444;

        /// <summary>
        /// 身份证号码格式不正确
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "CardNumber", Description = "身份证号码格式不正确", Prompt = "445")]
        public const int CardNumber = 445;

        /// <summary>
        /// 电子邮箱格式不正确
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "EmailNumber", Description = "电子邮箱格式不正确", Prompt = "446")]
        public const int EmailNumber = 446;

        /// <summary>
        /// 请求频繁
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "Frequency", Description = "请求频繁", Prompt = "510")]
        public const int Frequency = 510;

        /// <summary>
        /// 暂停服务
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "SuspensionService", Description = "暂停服务", Prompt = "502")]
        public const int SuspensionService = 502;

        /// <summary>
        /// 客户端版本已是最新版本
        /// </summary>
        [Display(GroupName = "通用错误码", Name = "ClientVersionIsLastVersion", Description = "客户端版本已是最新版本", Prompt = "600")]
        public const int ClientVersionIsLastVersion = 600;

        /// <summary>
        /// 邮箱/短信 验证码发送失败
        /// </summary>
        [Display(GroupName = "安全认证错误码", Name = "SendFail", Description = "验证码发送失败", Prompt = "4001")]
        public const int SendFail = 4001;

        /// <summary>
        /// 参数格式不正确
        /// </summary>
        [Display(GroupName = "安全认证错误码", Name = "FormatError", Description = "参数格式不正确", Prompt = "4002")]
        public const int FormatError = 4002;

        /// <summary>
        /// 获取结果信息错误
        /// </summary>
        [Display(GroupName = "安全认证错误码", Name = "ResultError", Description = "获取结果信息不正确", Prompt = "4003")]
        public const int ResultError = 4003;

        #endregion

        #region 用户错误码

        /// <summary>
        /// 电话号无效
        /// </summary>
        [Display(GroupName = "电话号无效", Name = "MobileInvalid", Description = "MobileInvalid", Prompt = "9001")]
        public const int MobileInvalid = 9001;
        /// <summary>
        /// 邮箱无效
        /// </summary>
        [Display(GroupName = "邮箱无效", Name = "EmailInvalid", Description = "EmailInvalid", Prompt = "442")]
        public const int EmailInvalid = 442;

        /// <summary>
        /// 用户不存在
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "UserNotExist", Description = "用户不存在", Prompt = "427")]
        public const int UserNotExist = 427;

        /// <summary>
        /// 密码错误
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "PasswordError", Description = "密码错误", Prompt = "430")]
        public const int PasswordError = 430;

        /// <summary>
        /// 用户群组不存在
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "PersonGroupExist", Description = "用户群组不存在", Prompt = "5003")]
        public const int PersonGroupExist = 5003;

        /// <summary>
        /// 无权限编辑群组信息
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "UserUnauthorized", Description = "无权限编辑群组信息", Prompt = "5004")]
        public const int UserUnauthorized = 5004;


        /// <summary>
        /// 创建计划失败
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "CreatedPlanError", Description = "创建计划失败", Prompt = "5005")]
        public const int CreatedPlanError = 5005;

        /// <summary>
        /// 用户邮箱和电话不匹配
        /// </summary>
        [Display(GroupName = "用户邮箱和电话不匹配", Name = "UserNotExist", Description = "用户邮箱和电话不匹配", Prompt = "5013")]
        public const int UserNotMatch = 5013;
        /// <summary>
        /// 用户被禁用
        /// </summary>
        [Display(GroupName = "用户被禁用", Name = "UserForbidden", Description = "用户被禁用", Prompt = "5014")]
        public const int UserForbidden = 5014;

        /// <summary>
        /// 用户所属企业错误
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "UserEnterpriseError", Description = "用户所属企业错误", Prompt = "3003")]
        public const int UserEnterpriseError = 3003;

        /// <summary>
        /// sso登陆失败
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "SSOLogInfail", Description = "sso登陆失败", Prompt = "3201")]
        public const int SSOLogInfail = 3201;

        /// <summary>
        /// 用户已存在
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "WXUserExist", Description = "用户已存在", Prompt = "3004")]
        public const int UserExist = 3004;

        /// <summary>
        /// 用户已存在
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "AccountUserExist", Description = "用户已存在", Prompt = "3013")]
        public const int AccountUserExist = 3013;

        ///// <summary>
        ///// 手机号码已存在
        ///// </summary>
        //[Display(GroupName = "用户错误码", Name = "MobileExist", Description = "手机号码已存在", Prompt = "3006")]
        //public const int MobileExist = 3006;

        /// <summary>
        /// 邮箱地址已存在
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "EamilExist", Description = "邮箱地址已存在", Prompt = "3007")]
        public const int EmailExist = 3007;

        /// <summary>
        /// 计划不存在
        /// </summary>
        [Display(GroupName = "计划错误码", Name = "PlanNotExist", Description = "计划不存在", Prompt = "3008")]
        public const int PlanNotExist = 3008;

        /// <summary>
        /// 研讨会异常
        /// </summary>
        [Display(GroupName = "计划错误码", Name = "WebinarError", Description = "研讨会异常", Prompt = "3100")]
        public const int WebinarError = 3100;

        /// <summary>
        /// 状态修改失败
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "StatusError", Description = "状态修改失败", Prompt = "3010")]
        public const int StatusError = 3010;

        /// <summary>
        /// 用户未实名
        /// </summary>
        [Display(GroupName = "用户未实名", Name = "UserUnverified", Description = "用户未实名", Prompt = "3011")]
        public const int UserUnverified = 3011;

        /// <summary>
        /// 推荐码不存在
        /// </summary>
        [Display(GroupName = "推荐码不存在", Name = "RefereeNotExist", Description = "推荐码不存在", Prompt = "3012")]
        public const int RefereeNotExist = 3012;

        /// <summary>
        /// 计划未过期
        /// </summary>
        [Display(GroupName = "计划错误码", Name = "PlanInValidity", Description = "计划未过期", Prompt = "3009")]
        public const int PlanInValidity = 3009;

        /// <summary>
        /// 入境时间不正确
        /// </summary>
        [Display(GroupName = "计划错误码", Name = "EntryTime", Description = "入境时间不正确", Prompt = "3010")]
        public const int EntryTime = 3010;

        /// <summary>
        /// 计划异常
        /// </summary>
        [Display(GroupName = "计划错误码", Name = "PlanError", Description = "计划异常", Prompt = "3101")]
        public const int PlanError = 3101;

        /// <summary>
        /// 别名已存在
        /// </summary>
        [Display(GroupName = "别名错误码", Name = "VanityNameExist", Description = "会议别名已存在", Prompt = "4100")]
        public const int VanityNameExist = 4100;

        /// <summary>
        /// 用户不存在
        /// </summary>
        [Display(GroupName = "用户不存在", Name = "AccountNotExist", Description = "用户不存在", Prompt = "428")]
        public const int AccountNotExist = 428;
        #endregion


        #region 登录
        /// <summary>
        /// 头像更新失败
        /// </summary>
        [Display(GroupName = "头像错误码", Name = "HeadPhotoUpdateFail", Description = "头像更新失败", Prompt = "70014")]
        public const int HeadPhotoUpdateFail = 7014;

        /// <summary>
        /// 学校更新失败
        /// </summary>
        [Display(GroupName = "密码错误码", Name = "PasswordUpdateFail", Description = "密码更新失败,请稍后再试", Prompt = "70015")]
        public const int PasswordUpdateFail = 7015;

        /// <summary>
        /// 请求超时失败
        /// </summary>
        [Display(GroupName = "请求超时错误码", Name = "ExpiresSecondsFail", Description = "请求超时失败,请稍后再试", Prompt = "70016")]
        public const int ExpiresSecondsFail = 7016;

        /// <summary>
        /// 签名认证失败
        /// </summary>
        [Display(GroupName = "签名认证错误码", Name = "AuthSignFail", Description = "签名认证失败,请稍后再试", Prompt = "70017")]
        public const int AuthSignFail = 7017;
        #endregion

        #region 用户
        /// <summary>
        /// 用户更新失败,请稍后再试
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "PasswordUpdateFail", Description = "用户更新失败,请稍后再试", Prompt = "416")]
        public const int UserUpdateFail = 416;
        /// <summary>
        /// 用户更新facetoken失败,请稍后再试
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "UpdateFaceFail", Description = "用户更新facetoken失败,请稍后再试", Prompt = "417")]
        public const int UpdateFaceFail = 417;

        /// <summary>
        /// 寸照错误
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "PhotoFormatError", Description = "寸照错误", Prompt = "413")]
        public const int PhotoError = 413;

        /// <summary>
        /// 温度值错误
        /// </summary>
        [Display(GroupName = "用户错误码", Name = "TempError", Description = "温度值错误", Prompt = "414")]
        public const int TempError = 414;
        #endregion

    }
}